<div class="entity-property">
    <!-- <clr-modal [(clrModalOpen)]="confirm">
        <h3 class="modal-title">Confirm Save</h3>
        <div class="modal-body">
            <p>Changes will save to database, continue?</p>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-outline" (click)="confirm = false">
                Cancel
            </button>
            <button type="button" class="btn btn-primary" (click)="confirmed()">
                Ok
            </button>
        </div>
    </clr-modal>
    <clr-modal [(clrModalOpen)]="setparent">
        <h3 class="modal-title">Select Parent</h3>
        <div class="modal-body">
            <app-select-entity-list></app-select-entity-list>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-outline" (click)="setparent = false">
                Cancel
            </button>
            <button type="button" class="btn btn-primary" (click)="confirmset()">
                Ok
            </button>
        </div>
    </clr-modal> -->
    <div class="title" *ngIf="entity">
        {{ entity.Name }} 属性

        <div class="opt-btn ">
            <button (click)="saveClick()" size="18">保存</button>

            <button class="optbutton" (click)="removeClick()" size="18">删除</button>
        </div>
    </div>

    <div class="tool-bar" *ngIf="entity">
        <span class="item" (click)="sortProperty()">按首字母排序
        </span>
    </div>
    <div *ngFor="let item of getEntity" class="row">
        <span class="item" style="width: 40%">{{ item }}
            <button type="button" title="设置父节点"
                style="padding: 0;margin: 0; height: 20px; width: 20px; position: relative; border: 0;"
                *ngIf="item == 'parentId'" class="btn btn-icon small" aria-label="home" (click)="setParent()">

            </button></span>

        <input *ngIf="!readOnly(item)" style="width: 60%" type="text" [(ngModel)]="entity[item]" />
        <span *ngIf="readOnly(item)">{{ entity[item] }}</span>
    </div>
</div>